package cn.chinaunicom.fast.common.exception;

/**
 * @ProjectName: cloud
 * @Package: com.springboot.cloud.common.core.exception
 * @ClassName: ServiceErrorType
 * @Description: java类作用描述
 * @Author: wangjc
 * @CreateDate: 2020/4/9 0009 10:49
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/4/9 0009 10:49
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
public enum ServiceErrorType implements ErrorType {
    SERVICE_ERROR_TYPE("600", "业务逻辑错误"),
    USER_PSW_ERROR("601", "用户或密码不正确"),
    LEDGER_BUILDING_NULL( "620", "建筑信息不存在"),
    LEDGER_UNIT_NULL( "621", "单元信息不存在"),
    LEDGER_FLOW_NULL( "622", "楼层信息不存在"),
    LEDGER_HOME_NULL( "623", "户信息不存在"),
    LEDGER_UNIT_DEL( "624", "单元信息不能删除"),
    LEDGER_FLOW_DEL( "625", "楼层信息不能删除"),
    LEDGER_HOME_DEL( "626", "户信息不能删除"),
    USER_REGISTER_EXIST( "627", "用户名重复"),
    USER_CARNUMBER_EXIST("628","车牌号已被绑定"),
    GRID_NOTEXISTS("631","此人员没有绑定网格"),
    GRID_INVALID("632", "此人员绑定的网格已经失效"),
    GRID_NOGRIDMAN("633", "该网格没有网格长！"),
    ORG_NOCOMMUNITY("634", "当前登录人没有绑定社区/部门！"),
    PORG_ORG_NAME("635", "组织名称不能重复！"),
    PORG_ORG_CODE("636", "组织编码不能重复！"),
    PORG_MEMBER("637", "党组织内有党员信息时，不能进行删除！"),
    PHONE_EXIST("001","手机号已存在"),
    PAY_FAILURE("002","支付失败"),
    TENANT_EXIST("003","租户已存在"),
    COMMUNITY_EXISTS("004","开户社区已存在"),
    DEVICE_NOT_DELETE("638","同步人口数为0时，可进行删除!"),
    DEVICE_EXIST("639","SN已经存在!"),
    DEVICE_IP_NOT_EXIST("640","设备IP地址不正确!"),
    DEVICE_SN_NOT_EXIST("641","设备SN不正确!"),
    ESTATE_PKEYPLACE("642","小区已绑定重点场所,请先解绑再删除!"),
    ESTATE_BUILDINGS("643","小区已绑定建筑,请先解绑再删除!"),
    DEVICE_SERVICE_NOT_RUNNING("644","设备数据平台未启动!"),
    ESTATE_NOT_NAME("647","小区名称重复!"),
    ESTATE_WECHAT("648","小区已绑定微信用户,请先解绑再删除!"),
    NO_PROPERTY_MANAGEMERS("649","该小区物业还没有物业经理!");

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMesg() {
        return this.mesg;
    }

    /**
     * 错误类型码
     */
    private String code;
    /**
     * 错误类型描述信息
     */
    private String mesg;

    ServiceErrorType(String code, String mesg) {
        this.code = code;
        this.mesg = mesg;
    }
}
